package com.mzz.behavior.state.state;

/**
 *
 * @author xushijian
 * @date 18/5/16
  上午9:47
 */
public class Test {

    public static void main(String[] args) {

        State state = new State();

        Context context = new Context(state);

        //设置状态一
        state.setValue("method1");
        context.method();

        //设置状态二
        state.setValue("method2");
        context.method();
    }
}
